﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TriUan
{
    public enum InformationIndex
    { 
        EHelp,
        VHelp,
        EAbout,
        VAbout,
        ECredit,
        VCredit,
        EClassicMode,
        VClassicMode,
        ECreateMode,
        VCreateMode,
        EFreeStyleMode,
        VFreeStyleMode,
        TitleHelp,
        TitleAbout,
        TitleOptions,
        TitleCredit,
        TitleClassicMode,
        TitleCreateMode,
        TitleFreeStyleMode

    }
    public class GameInformation
    {
        #region Property

        public static bool IsEnglishMode { get; set; }
        public static String EHelp { get; set; }
        public static String VHelp { get; set; }
        public static String EAbout { get; set; }
        public static String VAbout { get; set; }
        public static String ECredit { get; set; }
        public static String VCredit { get; set; }
        public static String EClassicMode { get; set; }
        public static String VClassicMode { get; set; }
        public static String ECreateMode { get; set; }
        public static String VCreateMode { get; set; }
        public static String EFreeStyleMode { get; set; }
        public static String VFreeStyleMode { get; set; }

        #endregion

        #region Method

        public static void Init(List<String> listText)
        {
            for (int i = 0;i < listText.Count; i+=2)
            {
                InformationIndex index = (InformationIndex)Int32.Parse(listText[i]);
                switch (index)
                {
                    case InformationIndex.EHelp:
                        EHelp = listText[i + 1];
                        break;
                    case InformationIndex.VHelp:
                        VHelp = listText[i + 1];
                        break;
                    case InformationIndex.EAbout:
                        EAbout = listText[i + 1];
                        break;
                    case InformationIndex.VAbout:
                        VAbout = listText[i + 1];
                        break;
                    case InformationIndex.ECredit:
                        ECredit = listText[i + 1];
                        break;
                    case InformationIndex.VCredit:
                        VCredit = listText[i + 1];
                        break;
                    case InformationIndex.EClassicMode:
                        EClassicMode = listText[i + 1];
                        break;
                    case InformationIndex.VClassicMode:
                        VClassicMode = listText[i + 1];
                        break;
                    case InformationIndex.ECreateMode:
                        ECreateMode = listText[i + 1];  
                        break;
                    case InformationIndex.VCreateMode:
                        VCreateMode = listText[i + 1];
                        break;
                    case InformationIndex.EFreeStyleMode:
                        EFreeStyleMode = listText[i + 1];
                        break;
                    case InformationIndex.VFreeStyleMode:
                        VFreeStyleMode = listText[i + 1];
                        break;
                }
            }
        }

        public static String GetTitle(InformationIndex index)
        {
            switch (index)
            {
                case InformationIndex.TitleHelp:
                    if (IsEnglishMode)
                        return "Help";
                    else
                        return "Hướng Dẫn";
                case InformationIndex.TitleAbout:
                    if (IsEnglishMode)
                        return "About";
                    else
                        return "Thông Tin";
                case InformationIndex.TitleOptions:
                    if (IsEnglishMode)
                        return "Options";
                    else
                        return "Tùy Chọn";
                case InformationIndex.TitleCredit:
                    if (IsEnglishMode)
                        return "Credit";
                    else
                        return "Giới Thiệu";
                case InformationIndex.TitleClassicMode:
                    if (IsEnglishMode)
                        return "Classic Mode";
                    else
                        return "Truyền Thống";
                case InformationIndex.TitleCreateMode:
                    if (IsEnglishMode)
                        return "Create Mode";
                    else
                        return "Sáng Tạo";
                case InformationIndex.TitleFreeStyleMode:
                    if (IsEnglishMode)
                        return "FreeStyle Mode";
                    else
                        return "Giải Trí";
            }
            return null;
        }

        public static String GetHelp()
        {
            if (IsEnglishMode)
                return EHelp;
            else
                return VHelp;
        }

        public static String GetAbout()
        {
            if (IsEnglishMode)
                return EAbout;
            else
                return VAbout;
        }

        public static String GetCredit()
        {
            if (IsEnglishMode)
                return ECredit;
            else
                return VCredit;
        }

        public static String GetClassicMode()
        {
            if (IsEnglishMode)
                return EClassicMode;
            else
                return VClassicMode;
        }

        public static String GetCreateMode()
        {
            if (IsEnglishMode)
                return ECreateMode;
            else
                return VCreateMode;
        }

        public static String GetFreeStyleMode()
        {
            if (IsEnglishMode)
                return EFreeStyleMode;
            else
                return VFreeStyleMode;
        }

        #endregion
    }
}
